﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%="" %>
	Sociedades - ASINDO
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
    function GridOnEdit(e) {
        var form = e.form;
        $(form).find("input:first").focus();
        $(form).find("input").keydown(function (e) {
            if (e.which == 13) {
                $(form).find("a.t-grid-insert").click();
                $(form).find("a.t-grid-update").click();
                e.preventDefault();
            }
            else {
            }
        });
    }
</script>

    <h2>Sociedades</h2>
    <p><% Html.ValidationSummary("Se encontraron errores")%></p>
<% Html.Telerik().RejillaAutoeditable(Of GridSociedadModel)(controller:="Sociedad").DataKey(Function(s) s.Id) _
    .Columns(Sub(colfactory)
                 colfactory.Bound(Function(s) s.Nombre)
                 colfactory.Bound(Function(s) s.PacientesCount).Title("# pacientes").ReadOnly()
             End Sub) _
     .ClientEvents(Sub(events)
                       events.OnEdit("GridOnEdit")
                   End Sub) _
     .Render()
%>

</asp:Content>

